home *** CD-ROM | disk | FTP | other *** search
/ Software Vault: The Gold Collection / Software Vault - The Gold Collection (American Databankers) (1993).ISO / cdr49 / 273_01.zip / CLREOL.CC < prev    next >
Text File  |  1993-04-04  |  745b  |  26 lines

  1. #include <dos.h>
  2. clr_eol(int last_col)
  3. /* This will clear from the current cursor location the the end of the line.
  4.    The last column of the line is specified as last_col
  5. */
  6.  
  7.  {
  8.     union REGS inregs;
  9.     int cur_row, cur_col;
  10.     inregs.h.bh=0; inregs.h.ah=3;                    /*get cursor position*/
  11.     int86(0x10,&inregs,&inregs);
  12.     cur_row=inregs.h.dh;
  13.     cur_col=inregs.h.dl;
  14.     if(last_col < cur_col) return(1);
  15.     inregs.h.ah=8; inregs.h.bh=0;                    /*get current attr*/
  16.     int86(0x10,&inregs,&inregs);
  17.     inregs.h.bh=inregs.h.ah;                        /*clear to endof line*/
  18.     inregs.h.ah=6; inregs.h.al=0;
  19.     inregs.h.ch=cur_row;
  20.     inregs.h.cl=cur_col;
  21.     inregs.h.dh=cur_row;
  22.     inregs.h.dl=last_col;
  23.     int86(0x10,&inregs,&inregs);
  24.     return(0);
  25. }
  26.